<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>主页</title>
    <link rel="stylesheet" href="../aui/css/aui.2.0.css">
</head>
<body>
<div class="aui-content" id="app" >
    <div class="aui-tab" id="tab"
         v-for="(vo,index) in tab_info"
         v-bind:class="{'aui-active':index  == tab_count}"
         v-on:click="mian_tab(index)" >
        <div class="aui-tab-item " >{{ vo.title }}</div>
    </div>
</div>
</body>
<script src="vue2.1.js"></script>
</html>
<script type="text/javascript">
    var vm = new Vue({
        el: '#app',
        data: {
            index_data:[],
            tab_count: 0,//显示当前索引
            tab_info:[
                {
                    'title':'新闻',	//新闻
                },
                {
                    'title':'关注',	//关注
                },
                {
                    'title':'历史',	//历史
                },
            ],
            imglist:[
                {
                    "zid": "40",
                    "sname": "迎新年送年货",
                    "spic": "http://image.fumintouzi.com/201612/2016122317-4912-16655.png",
                    "IIndex": "0",
                    "ILocation": "2",
                    "Status": "True"
                },
                {
                    "zid": "42",
                    "sname": "年会",
                    "spic": "http://image.fumintouzi.com/201612/2016122617-5054-79123.jpg",
                    "IIndex": "0",
                    "ILocation": "2",
                    "Status": "True"
                },
                {
                    "zid": "1",
                    "sname": "",
                    "spic": "http://image.fumintouzi.com/201609/2016092209-5128-54312.jpg",
                    "IIndex": "1",
                    "ILocation": "2",
                    "Status": "True"
                },
            ]
        },
        methods: {
            init: function () {
                vm.index_data = obtain_goods_list();
            },
            mian_tab:function(arr){
                vm.tab_count = arr;
            }
        }
    });

    apiready = function(){
        vm.init();
    }
</script>